Skip to content

Export af (not MAF) in top_loci; add medianAbsCorr; PIP screen after harmonization#530

Merged
danielnachun merged 3 commits into
StatFunGen:mainfrom
Yining97:rss-finemap-af-purity-qc-order
Jun 23, 2026
Merged

Export af (not MAF) in top_loci; add medianAbsCorr; PIP screen after harmonization#530
danielnachun merged 3 commits into
StatFunGen:mainfrom
Yining97:rss-finemap-af-purity-qc-order

Conversation

@Yining97

Copy link
Copy Markdown
Contributor

Summary

  • top_loci exports af, not MAF. getTopLoci (posterior + marginal views) and the canonical
    builder now emit an effect-allele-frequency af column. The GwasSumStats/QtlSumStats methods also
    wire the QC'd entry frequency into it — it was never passed before, so the old MAF column was
    always NA. af is the harmonized, complemented frequency; NA when absent.
  • medianAbsCorr is now a fineMappingPipeline argument (default NULL), threaded to
    susie_get_cs for OR-logic credible-set purity alongside minAbsCorr.
  • The optional PIP screen runs after allele harmonization, so it screens the harmonized,
    panel-aligned variant set.

No backward-compatibility shims (alpha).

Tests

Updated the MAFaf schema assertions and added coverage for af passthrough (directional, NA
when unsupplied), medianAbsCorr OR-logic (admits ≥ sets; NULL no-op), and the PIP-screen ordering
(an off-panel signal no longer rescues a region; screen-off is unchanged). Full affected suite green:
443 tests / 1125 expectations, 0 failures.

Yining97 and others added 2 commits June 23, 2026 16:17
…harmonization

top_loci now exports the effect-allele frequency as an af column instead of
MAF, and the GwasSumStats/QtlSumStats methods actually wire the QC'd entry
frequency into it (it was never passed before, so the old MAF column was
always NA). af is the harmonized, complemented frequency; NA when absent.

fineMappingPipeline gains a medianAbsCorr argument (default NULL), threaded to
susie_get_cs for OR-logic credible-set purity alongside minAbsCorr.

The optional PIP screen now runs after panel-vs-sumstats allele harmonization,
so it operates on the harmonized variant set.

Tests: update the MAF->af schema assertions and add coverage for af passthrough,
medianAbsCorr OR-logic, and the PIP-screen ordering.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CI's conda-forge susieR (CRAN build) has no median_abs_corr in
susie_get_cs; guard the new OR-logic test so it runs only where susieR
supports it (GitHub-HEAD) and skips otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the hand-rolled fixed-ridge conditional with susieR's kriging RSS
diagnostic: estimate the LD-mismatch scale via estimate_s_rss() and take the
per-variant conditional distribution from kriging_rss(), flagging outliers on
its standardized residual. krigingOutlierQc now takes n (threaded from the QC
call site) and errors clearly when susieR lacks the diagnostic; ridge is gone.

Better calibrated than the fixed ridge, which over-flagged in the tails (chr21
reference: 28 -> 8 flagged, the 8 a strict subset).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@danielnachun danielnachun merged commit 9287c0f into StatFunGen:main Jun 23, 2026
4 of 5 checks passed
@Yining97 Yining97 deleted the rss-finemap-af-purity-qc-order branch June 24, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants